#ifndef BLOCK_H_
#define BLOCK_H_

#include "GraphicalElement.h"
#include "Position.h"
#include <list>

class Block : public GraphicalElement
{
public:
    Block(const Position& position, const Color& color);
    Block(long id, const Position& position, const Color& color);
    virtual ~Block();

    void handleUpdateBlockEvent(long blockId, const Position& newPosition);
    void runFadeOutAnimation(long rowId);

protected:
    virtual void handleEvent(const Event& event);

private:
    void init(const Color& color, const Position& position);
};

typedef std::list<Block*> Blocks;

#endif
